<template>
  <div id="main404">
    <div>
      嘤嘤嘤，找不到页面了!!!都怪你
      <p>还要{{ num }}秒，跳转首页</p>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      num: 5
    }
  },
  created() {
    const time = setInterval(() => {
      this.num--
      if (this.num === 0) {
        this.$router.push('/')
        clearInterval(time)
      }
    }, 1000)
  }
}
</script>

<style lang="less" scoped>
#main404 {
  height: 100%;
  width: 100%;
  display: flex;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.8);
  div {
    align-self: center;
    text-align: center;
    width: 380px;
    height: 400px;
    font-size: 32px;
    color: #fff;
  }
}
</style>
